﻿using System;
using System.Windows;
using System.Windows.Forms;
using MahApps.Metro.Controls;

namespace FileClient.Wpf
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : MetroWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }
        
        
        private void MainWindow_OnStateChanged(object sender, EventArgs e)
        {
            if (this.WindowState == WindowState.Minimized)
            {
                this.Hide();
            }

            // if (this.WindowState == WindowState.Normal || this.WindowState == WindowState.Maximized)
            //
            // {
            //     this.Show();
            //     this.Activate();
            //
            // }
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var mangePage = new MainPage();
            _mainFrame.Navigate(mangePage);
        }
    }
}